<template>
	<view class="scan-container">
		<xh-qrcode-scanner ref="scanRef" :qrbox="250" :fps="60" @result="onScan"></xh-qrcode-scanner>
	</view>
</template>

<script setup>
	import { ref } from 'vue';
	import { onLoad } from '@dcloudio/uni-app'

	onLoad(() => {
		
	})
	//扫描结果
	const onScan = (decodedText)=>{
		uni.$emit('getScanResult', decodedText)
		uni.navigateBack()
	}
</script>

<style lang="scss">
page{
	background-color: rgba(0, 0, 0, 0.48);
}
.scan-container{
	width: 100%;
	height: 100vh;
}
</style>